{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 请求 https://scapi.tayunyx.com/ytest/dayPay\n",
    "import requests\n",
    "\n",
    "url = \"https://scapi.tayunapi.com/ytest/dayPay\"\n",
    "\n",
    "response = requests.get(url)\n",
    "# 用正则匹配 { 到 < 的内容\n",
    "# import re\n",
    "\n",
    "# pattern = r'\\{.*?<'\n",
    "# match = re.search(pattern, response.text, re.DOTALL)\n",
    "\n",
    "# if match:\n",
    "#     json_content = match.group()\n",
    "#     # 移除最后的 '<' 字符\n",
    "#     json_content = json_content[:-1]\n",
    "#     print(json_content)\n",
    "# else:\n",
    "#     print(\"未找到匹配的内容\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{\"reg_count\":2447,\"uuid_count\":2789,\"user_count\":10672,\"order_sum\":24755.9,\"order_count\":233,\"last_order_sum\":304,\"last_arpu\":8.8224}\n"
     ]
    }
   ],
   "source": [
    "print (response.text)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "crewai",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
